package com.iotest;

import java.io.*;

/**
 * @Author: huhx
 * @Date: 2017-11-10 下午 3:56
 */
public class CopyLines {
    public static void main(String[] args) throws IOException {
        BufferedReader inputStream = null;
        PrintWriter outputStream = null;

        try {
            inputStream = new BufferedReader(new FileReader("huhx-test/file/huhx.txt"));
            outputStream = new PrintWriter(new FileWriter("huhx-test/file/linuxLine.txt"));

            String line;
            while ((line = inputStream.readLine()) != null) {
                outputStream.println(line);
            }
        } finally {
            if (inputStream != null) {
                inputStream.close();
            }
            if (outputStream != null) {
                outputStream.close();
            }
        }
    }
}
